package com.kemai.designmode.visit

import com.kemai.common.utils.AppUtils
import com.kemai.designmode.entry.Fruit

import com.kemai.designmode.entry.fruit.Banana

import com.kemai.designmode.entry.fruit.Orange

import com.kemai.designmode.entry.fruit.Apple


/**

 *@description:计算水果价格
 * @author: zhaoshanshan
 * @date: 2022/10/4 12:00 下午

 */
class Visit {

    //苹果计价
    fun sell(apple: Apple?): Double {
        AppUtils.getInstance()?.showToast("apple's price: ￥50")
        return 50.0
    }

    //桔子计价
    fun sell(orange: Orange?): Double {
        AppUtils.getInstance()?.showToast("orange's price: ￥20")
        return 20.0
    }

    //香蕉计价
    fun sell(banana: Banana?): Double {
        AppUtils.getInstance()?.showToast("banana's price: ￥30")
        return 30.0
    }

    //其它水果计价
    fun sell(fruit: Fruit?): Double {
        AppUtils.getInstance()?.showToast("other price: ￥10")
        return 10.0
    }
}